<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="common :: header"/>
<body style="background-color: #fff">
    <style>
        .dm-form{padding-top: 30px; padding-left: 50px;}
        .dm-form tr{height: 55px;}
        .dm-form input{width: 260px}
        .dm-label{width: 80px;padding-right: 15px;text-align: right}
    </style>
    <form id="form" class="dm-form" method="post" action='/system/role/edit'>
        <input type="hidden" name="roleId" th:value="${role.roleId}">
        <table>
            <tr>
                <td class="dm-label">角色名称</td>
                <td class="dm-content">
                    <input class="easyui-textbox" name="roleName" data-options="required:true" th:value='${role.roleName}'>
                </td>
            </tr>
            <tr>
                <td class="dm-label">角色关键字</td>
                <td class="dm-content">
                    <input class="easyui-textbox" name="roleKey" data-options="required:true" th:value="${role.roleKey}">
                </td>
            </tr>
            <tr>
                <td class="dm-label">角色排序</td>
                <td class="dm-content">
                    <input name="roleSort" class="easyui-numberspinner" data-options="required:true" th:value="${role.roleSort}">
                </td>
            </tr>
            <tr>
                <td class="dm-label">角色说明</td>
                <td class="dm-content">
                    <input class="easyui-textbox" name="remark" th:value="${role.remark}">
                </td>
            </tr>
            <tr>
                <td class="dm-label">角色状态</td>
                <td class="dm-content">
                    <input id="input_status" name="status" th:value="${role.status}">
                </td>
            </tr>
        </table>
    </form>
<script type="text/javascript">
    $(function() {
        $('#input_status').combobox({
            data: [{value:0,text:'正常'},{value:1,text:'停用'}],
            panelHeight: 'auto',
            editable: false
        })
    });
    function submitHandler(index) {
        dm.save('form', function() {
            parent.layer.close(index);
            parent.dm.search('table');
        })
    }
</script>
</body>
</html>
